var $ = jQuery.noConflict();
$('.popup-control').click(function () {
	$('.popup').css('display', 'block');
  $('body').css('overflow','hidden');
});

$('.close').click(function () {
	$('.popup').css('display', 'none');
  $('body').css('overflow','auto');
});

$('.global-nav li').hover(function () {
	$(this).find('.sub-nav').toggleClass('block');
});

$('#nav-responsive li').click(function () {
	$(this).find('.sub-nav').toggleClass('block');
});
$(".carousel-inner div:first-child").addClass("active");

$(window).load(function () {
	$('.slider_box').flexslider({
		animation: "slide",
		animationLoop: true,
		itemWidth: 285,
		itemMargin: 0,
		move: 2,
		maxItems: 4,
		pauseOnHover: false,
		controlNav: false,
		directionNav: false,
		slideshowSpeed: 3000
	});
});

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    $("#menu-menu-website-tham-khao li").click(function(){
        $(this).find("ul").toggle();
    })
}

